#ifndef __MUTEXBASE_H__
#define __MUTEXBASE_H__

#include "plat/nonecopyable.h"

class MutexBase : public NoneCopyable
{
public:
    explicit MutexBase(bool recursive = false);
    virtual ~MutexBase();

public:
    bool TryLock();
    bool Lock(int timeout = -1);
    void UnLock();

private:
    void CreateMutex(bool recursive);

private:
    void *m_mutexHandle = nullptr;
};

#endif // __MUTEXBASE_H__
